Power consumption in a computer system or a data processing device presents a significant design issue for hardware and software developers in the computing industry. The popularity of so-called lap-top or notebook portable computers, which typically can operate on battery power, has emphasized the need for a power management system that reduces the use of electrical power. A power management system typically operates to conserve electrical power consumption by reducing power requirements in response to a detected lack of activity by a computer or its devices. By reducing power consumption when a computer or its devices are not in use, the cost for a user to power a computer is reduced and electrical power generation resources are conserved.
A typical power management system is a computer monitoring power-conservation system that detects activity at the computer by monitoring for computer input activity. The computer can enter a reduced power state upon detection of inactivity for a predetermined time period. For example, the computer can enter a reduced power state upon detection of a period that the user fails to input data, thereby resulting in the powering down of selected computer devices. The computer can resume normal operation by restoring power to required devices in response to activity by the user, such as keyboard or mouse input. It will be appreciated that this type of power management system effectively reduces power consumption by the computer during long intervals of inactivity, such as "after hours" or idle time power consumption by a computer in a business or home environment.
A power management event typically comprises either a power-down or power-up event. A sequence of power-down and power-up events can cause a computer device to enter a default state or a random state based on the loss of configuration information. It is often necessary to supply configuration information to a device via its device driver in response to a sequence of power-down and power-up events. This suggests a need for communicating power management events to a device driver for a device affected by a power transition to support this transfer of device configuration information.
The need for reconfiguring a device in response to a power management event has been addressed at the operating system-level by the use of an "Advanced Power Management" (APM)-aware device driver. These drivers provide a power management software interface for peripheral devices of a computer that is compatible with the APM system, which is defined by the APM BIOS interface specification, Revision 1.1, September 1993, distributed by Intel Corporation and Microsoft Corporation. An APM driver can manage power levels via function calls to an APM software interface and an APM BIOS manages power in the background based on device activity. In this manner, the consumption of power by devices can be managed either by the system BIOS or by the operating system. Significantly, a device driver must be APM-compatible to operate within the APM system and to supply configuration information to its device in response to a power management event. In other words, a conventional device driver that does not conform to the APM system specification may fail to respond to a power management event, thereby resulting in the loss of device configuration for the corresponding device.
In view of the foregoing, there is a need for alternative mechanisms to achieve the desirable objective of power management of devices that use conventional device drivers, i.e., non-compatible APM system drivers. This need typically arises in computer systems using removable devices, such as PCMCIA or PC Card devices that can be easily connected or removed from a compatible socket of the computer system. Similar to a sequence of power management events, power for a removable device is typically interrupted in response to a device removal event, and restored in response to a device insertion event. Conventional device drivers for this type of removable device, however, generally are not compatible with the APM system. These removable devices can lose device configuration information in response to a power-down/power-up sequence in the absence of an appropriate power management system. Indeed, if the power management event is not communicated to the device driver, the only way to return a device that has lost its device configuration to a useful state is to restart or re-boot the computer system. The present invention solves these issues by using the device removal and insertion signals normally generated by the removal or insertion of a device to support a power management application and to advise a driver for a device about a power management event.